QT -= gui
QT += core xml KIOCore KIOFileWidgets KIOWidgets KNTLM sql KIconThemes dbus

TEMPLATE = lib
CONFIG += plugin
DEFINES += KYLINTABLETDESKTOPBACKEND_LIBRARY

CONFIG += c++11
CONFIG += link_pkgconfig
PKGCONFIG += gsettings-qt
packagesExist(kysdk-sysinfo) {
    PKGCONFIG += kysdk-sysinfo
    DEFINES += USE_KYSDK_SYSINFO
}

LIBS += -lukui-appwidget-manager -ldl

# include(baseHead.pri)

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    appcategorymanager.cpp \
    appnamesort.cpp \
    config.cpp \
    database.cpp \
    desktopdataproviderprivate.cpp \
    desktopfilemanager.cpp \
    desktopitemhelper.cpp \
    desktopitemloader.cpp \
    iconprovider.cpp \
    icontheme.cpp \
    itempositioncalculator.cpp \
    tabletdesktopbackend.cpp \
    taskbarappmanager.cpp \
    ukuisettings.cpp \
    uninstaller.cpp \
    utils.cpp

HEADERS += \
    DatabaseSql.h \
    appcategorymanager.h \
    appnamesort.h \
    config.h \
    database.h \
    desktopdataproviderprivate_p.h \
    desktopfilemanager.h \
    desktopitemhelper.h \
    desktopitemloader.h \
    iconprovider.h \
    icontheme.h \
    itempositioncalculator.h \
    tabletdesktopbackend.h \
    taskbarappmanager.h \
    types.h \
    ukuisettings.h \
    uninstaller.h \
    utils.h

TRANSLATIONS += \
    translations/zh_CN.ts

isEmpty(PREFIX) {
    PREFIX = /usr
}

schemas.files += *.xml
schemas.path = /usr/share/glib-2.0/schemas/

#qm_files.path = /usr/share/ukui/translations/ukui-tablet-desktop
#qm_files.files = translations/zh_CN.qm

conf.files = $$PWD/../data/ukui-tablet-desktop.conf
conf.path = /etc

#!system($$PWD/../translate_generation.sh): error("Failed to generate translation")
INSTALLS += \
#    qm_files \
    schemas \
    conf

!isEmpty(target.path): INSTALLS += target conf
